<form id="add-form" class="form-horizontal col-sm-12" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[id]" value="{$row.id}">
    <div class="form-group">
        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label for="c-workorder_number">异常单编号:</label>
                <input id="c-workorder_number" data-rule="required" class="form-control" placeholder="异常单编号"
                       name="row[workorder_number]" value="{$row.workorder_number}" type="text">
            </div>
        </div>
        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label for="c-title">异常单标题:</label>
                <input id="c-title" data-rule="required" class="form-control" placeholder="工单标题" name="row[title]"
                       type="text" value="{$row.title}">
            </div>
        </div>
        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label for="c-product_name">产品名称:</label>
                <input id="c-product_name" data-rule="required" class="form-control" placeholder="产品名称"
                       name="row[product_name]" type="text" value="{$row.product_name}" >
            </div>
        </div>
        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label for="c-delivery_time">异常时间:</label>
                <input id="c-delivery_time" data-rule="required" class="form-control" placeholder="时间"
                       name="row[delivery_time]" type="text" value="{$row.delivery_time}">
            </div>
        </div>

        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label for="c-total">异常数量:</label>
                <input id="c-total" data-rule="required" class="form-control" placeholder="异常数量" name="row[total]"
                       type="text" value="{$row.total}">
            </div>
        </div>
        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label for="c-spot_check">抽检数:</label>
                <input id="c-spot_check" data-rule="required" class="form-control" placeholder="抽检数"
                       name="row[spot_check]" type="text" value="{$row.spot_check}">
            </div>
        </div>
        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label for="c-bad_number">不良数:</label>
                <input id="c-bad_number" data-rule="required" class="form-control" placeholder="不良数"
                       name="row[bad_number]" type="text" value="{$row.bad_number}">
            </div>
        </div>
        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label for="c-checker_name">检验员:</label>
                <input id="c-checker_name" data-rule="required" class="form-control" placeholder="检验员"
                       name="row[checker_name]" type="text" value="{$row.checker_name}" >
            </div>
        </div>

        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label for="c-checkpoint">发现地点:</label>
                <select id="c-checkpoint" name="row[checkpoint]" class="form-control">
                    <option value="进料检验"{eq name="$row.checkpoint" value="进料检验"}selected="selected"{/eq}>进料检验</option>
                    <option value="制程检验"{eq name="$row.checkpoint" value="制程检验"}selected="selected"{/eq}>制程检验</option>
                    <option value="出货检验"{eq name="$row.checkpoint" value="出货检验"}selected="selected"{/eq}>出货检验</option>
                    <option value="其他"{eq name="$row.checkpoint" value="其他"}selected="selected"{/eq}>其他</option>
                </select>
            </div>
        </div>
        <div class="col-xs-12 col-sm-10">
            <div class="form-group col-sm-10">
                <label>附件:</label>
                <div class="input-group">
                    <input id="c-files" class="form-control" size="50" name="row[files]"
                           type="text" value="{$row.files}">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload"
                                      data-input-id="c-files"
                                      data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                                      data-multiple="false" data-preview-id="p-collection_img"
                                      data-url="qingdongams/base/upload"><i class="fa fa-upload"></i> 上传</button></span>

                    </div>
                    <span class="msg-box n-right" for="c-files"></span>
                </div>
                <ul class="row list-inline plupload-preview" id="p-collection_img"></ul>
            </div>
        </div>
        <div class="col-xs-12 col-sm-10">
            <div class="form-group col-sm-10">
                <label>品质异常描述:</label>
                <textarea class="form-control" rows="3" name="row[remarks]"
                          placeholder="品质异常描述">{$row.remarks}</textarea>
            </div>
        </div>

    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
